<?php
session_start();//使用session
  require_once('system/myfunction.php');   
    require_once('system/DB_connect.php'); 
  $id = $_GET['id'];
  $username = $_POST["username"];
  $pwd = $_POST["pwd"];
 
  connect();
  //编写sql语句
  $sql = "select * from employees where id='".$id."' "; 
  
  $staff=fetch_array($sql);
  $result=fetch_one($sql);
  $name=$staff[0]['name'];

  $sql2="select * from works where id='".$id."' ";
  $staff2=fetch_array($sql2);


?>


<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Bootstrap Admin</title>
    <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <link rel="stylesheet" type="text/css" href="lib/bootstrap/css/bootstrap.css">
    
    <link rel="stylesheet" type="text/css" href="stylesheets/theme.css">
    <link rel="stylesheet" href="lib/font-awesome/css/font-awesome.css">

    <script src="lib/jquery-1.7.2.min.js" type="text/javascript"></script>

    <!-- Demo page code -->

    <style type="text/css">
        #line-chart {
            height:300px;
            width:800px;
            margin: 0px auto;
            margin-top: 1em;
        }
        .brand { font-family: georgia, serif; }
        .brand .first {
            color: #ccc;
            font-style: italic;
        }
        .brand .second {
            color: #fff;
            font-weight: bold;
        }
    </style>

    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

    <!-- Le fav and touch icons -->
    <link rel="shortcut icon" href="../assets/ico/favicon.ico">
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="../assets/ico/apple-touch-icon-144-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="../assets/ico/apple-touch-icon-114-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="../assets/ico/apple-touch-icon-72-precomposed.png">
    <link rel="apple-touch-icon-precomposed" href="../assets/ico/apple-touch-icon-57-precomposed.png">
  </head>

  <!--[if lt IE 7 ]> <body class="ie ie6"> <![endif]-->
  <!--[if IE 7 ]> <body class="ie ie7 "> <![endif]-->
  <!--[if IE 8 ]> <body class="ie ie8 "> <![endif]-->
  <!--[if IE 9 ]> <body class="ie ie9 "> <![endif]-->
  <!--[if (gt IE 9)|!(IE)]><!--> 
  <body class=""> 
  <!--<![endif]-->
    
    <div class="navbar">
        <div class="navbar-inner">
                <ul class="nav pull-right">
                    
                    <li><a href="#" class="hidden-phone visible-tablet visible-desktop" role="button">Settings</a></li>
                    <li id="fat-menu" class="dropdown">
                        <a href="#" role="button" class="dropdown-toggle" data-toggle="dropdown">
                            <i class="icon-user"></i> <?php echo $name;?>
                            <i class="icon-caret-down"></i>
                        </a>

                        <ul class="dropdown-menu">
                            <li><a tabindex="-1" href="index.php?c=staff&m=staff_account&id=<?php echo $id;?>">My Account</a></li>
                            <li class="divider"></li>
                            <li><a tabindex="-1" class="visible-phone" href="#">Settings</a></li>
                            <li class="divider visible-phone"></li>
                            <li><a tabindex="-1" href="index.php?c=index&m=Indexs">Logout</a></li>
                        </ul>
                    </li>
                    
                </ul>
                <a class="brand" href="index.php?c=index&m=staff_logi&id=<?php echo $id;?>"><span class="first">Your</span> <span class="second">Company</span></a>
        </div>
    </div>
    


    
    <div class="sidebar-nav">
        <form class="search form-inline">
            <input type="text" placeholder="Search...">
        </form>

        <a href="#dashboard-menu" class="nav-header" data-toggle="collapse"><i class="icon-dashboard"></i>Dashboard</a>
        <ul id="dashboard-menu" class="nav nav-list collapse in">
            <li><a href="index.php?c=index&m=staff_login&id=<?php echo $id;?>">Home</a></li>
           <li class="active"><a href="index.php?c=staff&m=staff_account&id=<?php echo $id;?>" >My Account</a></li>
            <li ><a href="index.php?c=staff&m=staff_apply&id=<?php echo $id;?>">Apply For</a></li>
            <li ><a href="#">Media</a></li>
            <li ><a href="#">Calendar</a></li>
            
        </ul>

        <a href="#" class="nav-header" data-toggle="collapse"><i class="icon-briefcase"></i>Account<span class="label label-info">+3</span></a>
        

        <a href="#" class="nav-header collapsed" data-toggle="collapse"><i class="icon-exclamation-sign"></i>Document <i class="icon-chevron-up"></i></a>
      

        <a href="#" class="nav-header" data-toggle="collapse"><i class="icon-legal"></i>Legal</a>
      

        <a href="" class="nav-header" ><i class="icon-question-sign"></i>Help</a>
        <a href="" class="nav-header" ><i class="icon-comment"></i>Faq</a>
    </div>
    

    
    <div class="content">
        
        <div class="header">
            
            <h1 class="page-title">My account</h1>
        </div>
        
                <ul class="breadcrumb">
            <li><a href="index.php?c=index&m=staff_login&id=<?php echo $id;?>">Home</a> <span class="divider">/</span></li>
            <li><a href="index.php?c=index&m=staff_apply">Aplly</a> <span class="divider">/</span></li>
            <li class="active">Submit application</li>
        </ul>

        <div class="container-fluid">
            <div class="row-fluid">
                    

<div class="well">
    <ul class="nav nav-tabs">

            
    </ul>
    <div id="myTabContent" class="tab-content">
      <div class="tab-pane active in" id="home">
    <table class="table">
               <thead>
                <tr>
                  <th> ID</th>
                  <th><?php echo $staff[0]['id']?></th>
                  <th></th>
                  <th>  </th>
                  <th> </th>
                  <th> </th>
                  <th> </th>
                </tr>
              </thead>
              <thead>
                <tr>
                  <th> Name</th>
                  <th><?php echo $staff[0]['name']?></th>
                  <th></th>
                  <th>  </th>
                  <th> </th>
                  <th> </th>
                  <th> </th>
                </tr>
              </thead>

               <thead>
                <tr>
                  <th> Event</th>
                  <th><?php  if( $staff2[0]['type']=='1'){echo "在职";} else if($staff2[0]['type']=='2'){echo "出差";} else if( $staff2[0]['type']=='3'){echo "休假";} else if( $staff2[0]['type']=='4'){echo "离职";}?></th>
                  <th></th>
                  <th>  </th>
                  <th> </th>
                  <th> </th>
                  <th> </th>
                </tr>
              </thead>
              <thead>
                <tr>
                  <th> AppplyForTime</th>
                  <th><?php echo $staff2[0]['content']?></th>
                  <th></th>
                  <th>  </th>
                  <th> </th>
                  <th> </th>
                  <th> </th>
                </tr>
              </thead>
              
              
             <!-- <a href='index.php?c=staff&m=staff_apply&id=<?php echo $id?>'><i class='icon-pencil'></i> </a> -->
              
            </table>
      </div>
  </div>

</div>

<div class="modal small hide fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h3 id="myModalLabel">Delete Confirmation</h3>
  </div>
  <div class="modal-body">
    
    <p class="error-text"><i class="icon-warning-sign modal-icon"></i>Are you sure you want to delete the user?</p>
  </div>
  <div class="modal-footer">
    <button class="btn" data-dismiss="modal" aria-hidden="true">Cancel</button>
    <button class="btn btn-danger" data-dismiss="modal">Delete</button>
  </div>
</div>


                    
                    <footer>
                        <hr>
                        <!-- Purchase a site license to remove this link from the footer: http://www.portnine.com/bootstrap-themes -->
                    

                        <p>&copy; 2016 <a href="http://www.portnine.com" target="_blank"></a></p>
                    </footer>
                    
            </div>
        </div>
    </div>
    


    <script src="lib/bootstrap/js/bootstrap.js"></script>
    <script type="text/javascript">
        $("[rel=tooltip]").tooltip();
        $(function() {
            $('.demo-cancel-click').click(function(){return false;});
        });
    </script>
    
  </body>
</html>
